package microcredit.gui.action;

import java.awt.Component;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

import microcredit.gui.AboutDialog;
import microcredit.gui.MainFrame;

public class AboutAction extends AbstractAction {

	private static final long serialVersionUID = 1L;
	
	public AboutAction() {
		putValue(NAME, "<html>About");
		putValue(SMALL_ICON, new ImageIcon(AboutAction.class.getResource("/microcredit/icons/x16/about.png")));
	}
	
	public void actionPerformed(ActionEvent e) {
		MainFrame frame = (MainFrame)JOptionPane.getFrameForComponent((Component)e.getSource());
		AboutDialog dialog = new AboutDialog(frame);
		dialog.setVisible(true);
	}
	
}
